public class User {
    private String id;
    private String password;
    private double balance;
    private String name;
   private double limite;

    public User() {
    }

    public User(String id, String password, double balance, String name, double limite) {
        this.id = id;//存储用户卡号
        this.password = password;//存储密码
        this.balance = balance;//存储余额
        this.name = name;//存储用户名
        this.limite = limite;//存储最高限额
    }

    /**
     * 获取
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return balance
     */
    public double getBalance() {
        return balance;
    }

    /**
     * 设置
     * @param balance
     */
    public void setBalance(double balance) {
        this.balance = balance;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return limite
     */
    public double getLimite() {
        return limite;
    }

    /**
     * 设置
     * @param limite
     */
    public void setLimite(double limite) {
        this.limite = limite;
    }

    public String toString() {
        return "User{id = " + id + ", password = " + password + ", balance = " + balance + ", name = " + name + ", limite = " + limite + "}";
    }
    public void increase(double number){
        this.balance+=number;
    }
    public void reduce(double number){
        this.balance-=number;
    }
}
